var t = new(require("../../../utils/http").HTTP);
Page({
  data: {
    taga: [{
      id: 0,
      name: "环保产业"
    }, {
      id: 1,
      name: "大健康产业"
    }, {
      id: 2,
      name: "新能源产业"
    }, {
      id: 3,
      name: "智能制造产业"
    }, {
      id: 4,
      name: "文创产业"
    }, {
      id: 5,
      name: "农业产业"
    }],
    currentItem: 0
  },
  onLoad: function () {
    var a = this;
    t.request({
      url: "https://www.qlsyyun.com:3030/industry/data",
      data: {
        arr: 2
      }
    }).then((function (t) {
      a.setData({
        list: t.data
      })
    }))
  },
  tagChoose: function (a) {
    var e = this,
      n = a.currentTarget.dataset.id,
      r = a.currentTarget.dataset.name;
    e.setData({
        currentItem: n
      }),
      t.request({
        url: "https://www.qlsyyun.com:3030/industry/data",
        data: {
          arr: 1,
          name: r
        }
      }).then((function (t) {
        if (1 == t.data.length) {
          var a = t.data[0].cyzyjs.split("。");
          e.setData({
            list: a
          })
        } else
          e.setData({
            list: ""
          }), wx.showToast({
            title: "暂无对应产业资料",
            icon: "none",
            duration: 2e3
          })
      }))
  }
});